package org.nstack.header.console;

import org.nstack.header.identity.SessionInventory;
import org.nstack.header.message.Message;
import org.nstack.header.core.Completion;
import org.nstack.header.core.NoErrorCompletion;
import org.nstack.header.core.ReturnValueCompletion;
import org.nstack.header.vm.VmInstanceInventory;


public interface ConsoleBackend {
    String getConsoleBackendType();

    void grantConsoleAccess(SessionInventory session, VmInstanceInventory vm, ReturnValueCompletion<ConsoleInventory> complete);

    void deleteConsoleSession(VmInstanceInventory vm, Completion completion);

    void deleteConsoleSession(SessionInventory session, NoErrorCompletion completion);

    String returnServiceIdForConsoleAgentMsg(ConsoleProxyAgentMessage msg, String agentUuid);

    void handleMessage(Message msg);
}
